﻿@model IEnumerable<A_Shop.Models.Marca>

@{
    ViewBag.Title = "Index";
}

<h2>Marcas</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table style="background-color:rgba(255, 255, 255, 0.78)" class="table table-bordered">
    <tr class="success">
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Descripcion)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Foto)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Nombre)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Descripcion)
            </td>
            <td>
                <img src="@Html.DisplayFor(modelItem => item.Foto)" height="200" width="200"/>
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
                @Html.ActionLink("Details", "Details", new { id = item.id }) |
                <form action="~/Marca/Delete" method="get" name="id">
                    <input type="hidden" value="@item.id" name="id" />
                    <input type="submit" value="Eliminar" />
                </form>           
             </td>
        </tr>
    }

</table>
